/*
 *  Copyright (C) void Team 2010 Pedro Batista
 * 
 *  http://code.google.com/p/capacitec
 * 
 *  This file is part of capacitec.
 * 
 *  capacitec is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 * 
 *  capacitec is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with capacitec.  If not, see <http://www.gnu.org/licenses/>.
 */

package entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author pedro
 */
@Embeddable
public class AlunoSubProgramaTurmaPK implements Serializable {
	@Basic(optional = false)
        @Column(name = "aluno_subprograma_aluno_pessoa_id", nullable = false)
	private int alunoSubprogramaAlunoPessoaId;
	@Basic(optional = false)
        @Column(name = "aluno_subprograma_subPrograma_id", nullable = false)
	private int alunosubprogramasubProgramaid;
	@Basic(optional = false)
        @Column(name = "curso_id", nullable = false)
	private int cursoId;

	public AlunoSubProgramaTurmaPK() {
	}

	public AlunoSubProgramaTurmaPK(int alunoSubprogramaAlunoPessoaId, int alunosubprogramasubProgramaid, int cursoId) {
		this.alunoSubprogramaAlunoPessoaId = alunoSubprogramaAlunoPessoaId;
		this.alunosubprogramasubProgramaid = alunosubprogramasubProgramaid;
		this.cursoId = cursoId;
	}

	public int getAlunoSubprogramaAlunoPessoaId() {
		return alunoSubprogramaAlunoPessoaId;
	}

	public void setAlunoSubprogramaAlunoPessoaId(int alunoSubprogramaAlunoPessoaId) {
		this.alunoSubprogramaAlunoPessoaId = alunoSubprogramaAlunoPessoaId;
	}

	public int getAlunosubprogramasubProgramaid() {
		return alunosubprogramasubProgramaid;
	}

	public void setAlunosubprogramasubProgramaid(int alunosubprogramasubProgramaid) {
		this.alunosubprogramasubProgramaid = alunosubprogramasubProgramaid;
	}

	public int getCursoId() {
		return cursoId;
	}

	public void setCursoId(int cursoId) {
		this.cursoId = cursoId;
	}

	@Override
	public int hashCode() {
		int hash = 0;
		hash += (int) alunoSubprogramaAlunoPessoaId;
		hash += (int) alunosubprogramasubProgramaid;
		hash += (int) cursoId;
		return hash;
	}

	@Override
	public boolean equals(Object object) {
		// TODO: Warning - this method won't work in the case the id fields are not set
		if (!(object instanceof AlunoSubProgramaTurmaPK)) {
			return false;
		}
		AlunoSubProgramaTurmaPK other = (AlunoSubProgramaTurmaPK) object;
		if (this.alunoSubprogramaAlunoPessoaId != other.alunoSubprogramaAlunoPessoaId) {
			return false;
		}
		if (this.alunosubprogramasubProgramaid != other.alunosubprogramasubProgramaid) {
			return false;
		}
		if (this.cursoId != other.cursoId) {
			return false;
		}
		return true;
	}

	@Override
	public String toString() {
		return "entidades.AlunoSubProgramaTurmaPK[alunoSubprogramaAlunoPessoaId=" + alunoSubprogramaAlunoPessoaId + ", alunosubprogramasubProgramaid=" + alunosubprogramasubProgramaid + ", cursoId=" + cursoId + "]";
	}

}
